﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HFController;

namespace HFWebApp.Control
{
    public partial class ask_list_model : System.Web.UI.UserControl
    {
        public int TypeID { get; set; }
        public BagePages bp = new BagePages();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                //12条
                switch (TypeID)
                { 
                    case 1://最新
                        rpt_asklist.DataSource = AskController.getController().getAskList(12);
                        break;
                    case 2://已解决
                        rpt_asklist.DataSource = AskController.getController().getAskList(12, 1);
                        break;
                    case 3://最多悬赏
                        rpt_asklist.DataSource = AskController.getController().getAskList(12 ,"Points");
                        break;
                }
                rpt_asklist.DataBind();
            }
        }
    }
}